#ifndef _SHAPE_MANAGER_H_
#define _SHAPE_MANAGER_H_
#include <vector>
using namespace std;
#include "Shapes.h"
#define  MAX_NUM  20

class SkeletonTexture;
struct FontInfo
{
	QVector2D pos;
	int shapeScore;
	DWORD startTime;
};
class ShapeManager
{
public:
	ShapeManager();
	~ShapeManager();
	void  Update(float fElapsedtime,SkeletonTexture *skl);
	void  Render()
	{
		for (int i=0;i<mShapeList.size();i++)
		{
			mShapeList[i]->Render();
		}
	}
	int   GetScore()
	{
		return mTotalScore;
	}
	std::vector<Shapes*> getShapesInfoList()
	{
		return mShapeList;
	}
	std::vector<FontInfo> GetFontInfoList()
	{
		return mFonts;
	}
	void  Reset()
	{
		mShapeList.clear();
		AddNewShape();
		mTotalScore = 0;
		mElaspedTime = 0.0f;
	}
private:
	void  CheckShapeState();
	void  AddNewShape();	
	void  UpdateFonts();
	std::vector<Shapes*>  mShapeList;
	std::vector<FontInfo> mFonts;
	int mTotalScore;
	float mElaspedTime;
};
#endif